package ch.schlegl.fastsvn.json;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class Node {
	
	public enum NodeType {
		FOLDER("folder"), FILE("file");

		private String name;
		private NodeType(String name) {
			this.name = name;
		}
		public String toString() {
			return name;
		}
	}
	
	private String id;
	private String text;
	private NodeType cls;
	private boolean leaf;
	public Node(String id, String text, NodeType cls, boolean leaf) {
		super();
		this.id = id;
		this.text = text;
		this.cls = cls;
		this.leaf = leaf;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public NodeType getCls() {
		return cls;
	}
	public void setCls(NodeType cls) {
		this.cls = cls;
	}
	public boolean isLeaf() {
		return leaf;
	}
	public void setLeaf(boolean leaf) {
		this.leaf = leaf;
	}


}
